package com.jmlee.pojo;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author： 郑锦涛
 * @data： 2021/3/20 14:18
 * @version：1.0
 * @描述： coupon 实体类
 */
public class ACoupon {

    /**
     * id           id
     * name         优惠券名称
     * type         优惠券类型,1-> 定额  2-> 满减
     * startTime    开始时间
     * endTime      结束时间
     * totolAmount  满减总金额
     * discountAmount   折扣金额
     * amount       数量
     * shopId       商铺id
     * status       状态
     *
     */
    private Long id;
    private String name;
    private Integer type;
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date startTime;
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date endTime;
    private Integer totolAmount;
    private Integer discountAmount;
    private Integer amount;
    private Integer shopId;
    private Integer status;

    public ACoupon() {
    }

    @Override
    public String toString() {
        return "ACoupon{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", type=" + type +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", totolAmount=" + totolAmount +
                ", discountAmount=" + discountAmount +
                ", amount=" + amount +
                ", shopId=" + shopId +
                ", status=" + status +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getTotolAmount() {
        return totolAmount;
    }

    public void setTotolAmount(Integer totolAmount) {
        this.totolAmount = totolAmount;
    }

    public Integer getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountAmount(Integer discountAmount) {
        this.discountAmount = discountAmount;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Integer getShopId() {
        return shopId;
    }

    public void setShopId(Integer shopId) {
        this.shopId = shopId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
